package anni.aerp2.domain;

import java.io.Serializable;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import anni.core.grid.LongGridBean;

import org.hibernate.annotations.GenericGenerator;


/**
 * Erp2InviteBid generated by Lingo.
 *
 * @author Lingo
 * @since 2007年11月08日 上午 01时50分13秒93
 */
@Entity
@Table(name = "A_ERP2_INVITE_BID")
public class Erp2InviteBid extends LongGridBean {
    /** * serial. */
    static final long serialVersionUID = 0L;

    /** * id. */
    private Long id;

    /** * erp2Supplier. */
    private Erp2Supplier erp2Supplier;

    /** * erp2Bid. */
    private Erp2Bid erp2Bid;

    /** * price. */
    private Double price;

    /** * address. */
    private String address;

    /** * tel. */
    private String tel;

    /** * bidDate. */
    private Date bidDate;

    /** * email. */
    private String email;

    /** * descn. */
    private String descn;

    /** * erp2SuccessBids. */
    private Set<Erp2SuccessBid> erp2SuccessBids = new HashSet<Erp2SuccessBid>(0);

    /** * 构造方法. */
    public Erp2InviteBid() {
    }

    /** * @return id. */
    @GenericGenerator(name = "generator", strategy = "increment")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "ID", unique = true, nullable = false)
    public Long getId() {
        return id;
    }

    /** * @param id Long. */
    public void setId(Long id) {
        this.id = id;
    }

    /** * @return erp2Supplier. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "SUPPLLIER_ID")
    public Erp2Supplier getErp2Supplier() {
        return erp2Supplier;
    }

    /** * @param erp2Supplier Erp2Supplier. */
    public void setErp2Supplier(Erp2Supplier erp2Supplier) {
        this.erp2Supplier = erp2Supplier;
    }

    /** * @return erp2Bid. */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "BID_ID")
    public Erp2Bid getErp2Bid() {
        return erp2Bid;
    }

    /** * @param erp2Bid Erp2Bid. */
    public void setErp2Bid(Erp2Bid erp2Bid) {
        this.erp2Bid = erp2Bid;
    }

    /** * @return price. */
    @Column(name = "PRICE")
    public Double getPrice() {
        return price;
    }

    /** * @param price Double. */
    public void setPrice(Double price) {
        this.price = price;
    }

    /** * @return address. */
    @Column(name = "ADDRESS", length = 50)
    public String getAddress() {
        return address;
    }

    /** * @param address String. */
    public void setAddress(String address) {
        this.address = address;
    }

    /** * @return tel. */
    @Column(name = "TEL", length = 50)
    public String getTel() {
        return tel;
    }

    /** * @param tel String. */
    public void setTel(String tel) {
        this.tel = tel;
    }

    /** * @return bidDate. */
    @Column(name = "BID_DATE")
    public Date getBidDate() {
        return bidDate;
    }

    /** * @param bidDate Date. */
    public void setBidDate(Date bidDate) {
        this.bidDate = bidDate;
    }

    /** * @return email. */
    @Column(name = "EMAIL", length = 50)
    public String getEmail() {
        return email;
    }

    /** * @param email String. */
    public void setEmail(String email) {
        this.email = email;
    }

    /** * @return descn. */
    @Column(name = "DESCN", length = 2000)
    @Lob
    public String getDescn() {
        return descn;
    }

    /** * @param descn String. */
    public void setDescn(String descn) {
        this.descn = descn;
    }

    /** * @return erp2SuccessBids. */
    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "erp2InviteBid")
    public Set<Erp2SuccessBid> getErp2SuccessBids() {
        return erp2SuccessBids;
    }

    /** * @param erp2SuccessBids Set. */
    public void setErp2SuccessBids(Set<Erp2SuccessBid> erp2SuccessBids) {
        this.erp2SuccessBids = erp2SuccessBids;
    }
}
